package com.xiaofeng.pochi.mapper;

import com.xiaofeng.pochi.common.Page;
import com.xiaofeng.pochi.pojo.ShopOrderPay;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/09/17/23:49
 * @Description:
 */
@Component
public interface ShopOrderPayMapper {

    /**
     * 保存
     * @param orderPay
     */
    void save(ShopOrderPay orderPay);

    /**
     * 根据订单号查询支付订单
     * @param outTradeNo
     * @return
     */
    ShopOrderPay getByOutTradeNo(String outTradeNo);

    /**
     * 修改状态
     * @param shopOrderPay
     */
    void updateStatus(ShopOrderPay shopOrderPay);

    /**
     * 分页查询
     *
     * @param page
     * @return
     */
    List<ShopOrderPay> getByPage(Page<ShopOrderPay> page);

    /**
     * 查询总数
     * @param page
     * @return
     */
    Integer getCountByPage(Page<ShopOrderPay> page);

    ShopOrderPay get(Long id);

    /**
     * 根据商品订单id查询
     *
     */
    ShopOrderPay getByOrderId(Long id);
}
